package com.cze.vo;

import java.util.StringJoiner;

public class Product {
    private int productID;          // 商品ID
    private String serialNumber;    // 系列
    private String name;            // 名称
    private String brand;           // 品牌
    private String model;           // 型号
    private Double price;           // 价格
    private String picture;         // 图片
    private String description;     // 商品描述

    public Product() {
    }

    public Product(int productID, String serialNumber, String name, String brand, String model, Double price, String picture, String description) {
        this.productID = productID;
        this.serialNumber = serialNumber;
        this.name = name;
        this.brand = brand;
        this.model = model;
        this.price = price;
        this.picture = picture;
        this.description = description;
    }

    public int getProductID() {
        return productID;
    }

    public void setProductID(int productID) {
        this.productID = productID;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", Product.class.getSimpleName() + "[", "]")
                .add("productID=" + productID)
                .add("serialNumber='" + serialNumber + "'")
                .add("name='" + name + "'")
                .add("brand='" + brand + "'")
                .add("model='" + model + "'")
                .add("price=" + price)
                .add("picture='" + picture + "'")
                .add("description='" + description + "'")
                .toString();
    }
}